//
//  ProtocolDefine.h
//  WisdomZhuHai
//
//  Created by Admin on 14-10-24.
//  Copyright (c) 2014年 wyd. All rights reserved.
//

#ifndef WisdomZhuHai_ProtocolDefine_h
#define WisdomZhuHai_ProtocolDefine_h

#define OKAPIBASEURL @"http://api.okhaolvxing.com/okhaolvxing/index.php"

//错误码
#define CODE_HANDLE_SUCCESS @"000"      //处理成功
#define CODE_MSG_ERROR @"001"           //消息格式错误
#define CODE_USER_MSG_INVALID @"002"    //用户信息不合法
#define CODE_INVALID_CALL @"003"        //非法调用
#define CODE_TYPE_ERROR  @"004"         //类型不正确
#define CODE_OHTER_ERROR @"999"         //其他异常

//公共字段
#define P_TYPE @"type"
#define P_USERNAME @"username"
#define P_LOGINNAME @"loginname"
#define P_SID @"sid"
#define P_USERID @"userId"
#define P_TIMESTAMP @"timestamp"
#define P_REQUESTID @"requestId"
#define P_RESPCODE @"respCode"
#define P_RESPDESC @"respDesc"
#define P_RESPID @"respId"
#define P_SESSIONID @"sessionId"
#define P_REQ @"req"
#define P_LENGTH @"length"
#define P_TODAY @"today"
#define P_TOMORROW @"tomorrow"
#define P_AFTER_TOMORROW @"after_tomorrow"
#define P_PAGE_INDEX @"pageIndex"
#define P_PAGE @"page"

//分类
#define APICOLLECTION @"ApiCollection"
#define APIGOWAY @"ApiGoway"
#define APIGOODS @"ApiGoods"
#define APIUSER @"ApiUser"
#define APINEWSRELEASE @"ApiNewsRelease" 
#define APISTRATEGY @"ApiStrategy"
#define V2_APISTRATEGY @"V2ApiStrategy"
#define APITOOL @"ApiTool"
#define APIORDER @"ApiOrder"
#define APIUPDATE @"ApiUpdate"
#define APIAPPEVALUATE @"ApiAppEvaluate"
#define APIFEEDBACK @"ApiFeedBack"
#define APIMOVIECINEMA @"ApiMovieCinema"
#define APICOUPON @"ApiCoupon"
#define APIORDER @"ApiOrder"
//v 2.0
#define APINEWRELEASE @"ApiNewsRelease"
#define APISTRATEGY @"ApiStrategy"

//操作请求
#define R_SAVECOLLECTION @"saveCollection"
#define R_CANCELCOLLECTION @"cancelCollection"
#define R_GETSTORETYPE @"getStoreType"
#define R_GETSTORESLIST @"getStoreList"
#define R_GETGOODSLIST @"getGoodsList"
#define R_GETSTOREDETAIL @"getStoreDetail"
#define R_LOGIN @"login"
#define R_MOBILELOGIN @"mobileLogin"
#define R_ANYLOGIN @"anonyUserExit"
#define R_REGISTER @"register"
#define R_USERLOGOUT @"userLogout"
#define R_GETSLIDESANDSPECIAL @"getSlidesAndSpecial"
#define R_GETNEWSRELEASE @"getNewsRelease"
#define R_GETCLASSIFY @"getClassify"
#define R_GETSTRATEGY @"getStrategy"
#define R_GETSTRATEGYB @"getStrategyb"//V 2.0
#define R_GETCONTENT @"getContent"
#define R_GETTOOLS @"getTools"
#define R_GETTOOLITEMS @"getToolItems"//V 2.0
#define R_MOBILEVALIDATION @"mobileValidation"
#define R_SUBMITORDER @"submitOrder"
#define R_CONFIRMORDERPAY @"confirmOrderPay"
#define R_COMPLETEORDER @"completeOrder"
#define R_GETGOWAY @"getGoway"
#define R_GETGOWHERE @"getGoWhere"
#define R_UPDATE @"Update"
#define R_UPDATEUSERINFO @"updateUserInfo"
#define R_GETSTOREURL @"getStoreUrl"
#define R_SENDMSG @"feedback"
#define R_GETMOVIESANDCINEMAS @"getMoviesAndCinemas"
#define R_GETCINEMATHREEDAYSHOWTIME @"getCinemaThreeDayShowTime"
#define R_GETDETAILMOVIE @"getDetailMovie"
#define R_GETDETAILCINEMA @"getDetailCinema"
#define R_GETCINEMAPLAYTHISMOVIE @"getCinemaPlayThisMovie"
#define R_GETTICKETBUYDETAIL @"getTicketBuyDetail"
#define R_MOBILEBIND @"mobileBind"
#define R_ORDERREFUND @"orderRefund"
#define R_ORDERREFUNDCONFIRM @"orderRefundConfirm"
#define R_ORDERDETAIL @"orderDetail"
#define R_ORDERCANCEL @"orderCancel"
#define R_GETNEWS @"getNews"
#define R_GETSTORES @"getStores"
#define R_GETCUSTOM @"getCustom"
#define R_GLOBALRETRIEVE @"globalRetrieve"
//V 2.0
#define R_GETCONTENT @"getContent"
//#define R_GETSTRATEGYB @"getStrategyb"
#define R_GETCONTENTPAGE @"getContentPage"

//商家
#define P_STORETYPES @"storeTypes"
#define P_LINK @"link"
#define P_LOGO @"logo"
#define P_AREA @"area"
#define P_STAR @"star"
#define P_RETURNCOUNT @"returnCount"//到第x条数据停止读取
#define P_BEGINNO @"beginNo"//从第x条数据开始读取
#define P_STROESLIST @"stroesList"
#define P_IMGURL @"imgUrl"
#define P_NAME @"name"
#define P_DESCRIPTION @"description"
#define P_ID @"id"
#define P_PRICE @"price"
#define P_USE_LIMIT @"use_limit"
#define P_GOODSLIST @"goodsList"
#define P_CONTENT @"content"
#define P_GOOD_ID @"id"
#define P_GOODID @"goodId"
#define P_STROE_ID @"storeId"
#define P_DETAILURL @"detailUrl"
#define P_LOCATION @"location"
#define P_GOODLIST @"goodList"
#define P_AREA_SQUARE @"area"
#define P_FLOOR @"floor"
#define P_HAVE_BREAKFAST @"breakfast"
#define P_INFO_PHOTO_PATH @"info_photo_path"
#define P_BASE_PRICE @"base_price"
#define P_DISTRICT_ID @"district_id"
#define P_ADRESS @"adress"
#define P_LOGO_PATH @"logo_path"
#define P_OPEN_TIME @"open_time"
#define P_SUGGEST_TIME @"suggest_time"
#define P_IS_FREE @"is_free"
#define P_IS_SELL @"is_sell"
#define P_PAYMENT @"payment_mode"
#define P_RATE @"rate"
#define P_HOTLISTS @"hotLists"
#define P_HOTLISTSBANNER @"hotListsBanner"
#define P_TYPE_ID @"type_id"
#define P_SMALL_INTRO @"small_intro"
#define P_LOGO_PATH @"logo_path"
#define P_PIC_URL @"pic_url"
#define P_DETAIL_LINK @"detail_link"
#define P_HOME_PAGE @"micro_website"
#define P_SCHEDULE @"schedule"
#define P_SET_OUT @"set_out"
#define P_CINEMA @"cinema"
#define P_CINEMAS @"cinemas"
#define P_TICKETS @"tickets"
#define P_CINEMAINFO @"cinemaInfo"
#define P_MOVIEINFOS @"movieInfos"
#define P_MOVIESHOWTIME @"movie_show_time"
#define P_BEGIN_TIME @"begin_time"
#define P_END_TIME @"end_time"
#define P_HALL_TYPE @"hall_type"
#define P_HAlL_NO @"hall_no"
#define P_MOVIE @"movie"
#define P_MOVIES @"movies"
#define P_COVER @"cover"
#define P_RATING @"rating"
#define P_MOVIE_RATING @"movie_rating"
#define P_MOVIE_KIND @"movie_kind"
#define P_MOVIEID @"movieId"
#define P_MOVIE_ID @"movie_id"
#define P_PUBLISH_TIME @"publish_time"
#define P_KIND @"kind"
#define P_DIRECTOR @"director"
#define P_MAIN_ACTOR @"main_actor"
#define P_CINEMA_ID @"cinemaId"
#define P_LINK_URL @"link_url"
#define P_PREFERENTIAL_PRICE @"preferential_price"
#define P_STORE_NAME @"store_name"

//用户
#define P_LOGINNAME @"loginname"
#define P_PASSWORD @"password"
#define P_MOBILEMODEL @"mobileModel"
#define P_LOGINCITY @"loginCity"
#define P_APPVERSION @"appVersion"
#define P_OSVERSION @"OSversion"
#define P_MAC @"mac"
#define P_WHICHSOURCE @"whichSource"
#define P_ANONY_OPEN @"anonyOpen"
#define P_ANONY_CLOSE @"anonyClose"
#define P_GENDER @"sex"
#define P_BIRTHDAY @"birthday"
#define P_INDUSTRY @"industry"
#define P_EMAIL @"email"
#define P_ADDRESS @"address"
#define P_MOBILENUMBER @"Mobile"

//订单
#define P_ORDER_LIST @"orderList"
#define P_RESULT @"result"
#define P_OKSNLIST @"oksnList"
#define P_PRODUCTLIST @"productList"

//首页专题
#define P_TOPICMAINTITLE @"topicMainTitle"
#define P_TOPICSECTITLE @"topicSecTitle"
#define P_TYPELIST @"typeList"
#define P_SLIDESLIST @"slidesList"
#define P_HOTTOPICLIST @"hotTopicList"
#define P_CONTENTURL @"contentUrl"
#define P_BRIEFINTRO @"briefIntro"
#define P_URL @"url"
#define P_TOPICID @"topicId"



//资讯列表
#define P_TYPEID @"typeId"
#define P_MESSAGELIST @"messageList"
#define P_IMAGEURL @"imageUrl"
#define P_CONTENTURL @"contentUrl"
#define P_TITLE @"title"
#define P_TIME @"time"
#define P_LABEL @"label"
#define P_SHORTCONTENT @"shortcontent"
#define P_VALUE @"value"
#define P_NPHOTO @"nphoto"
#define P_NRTITLE @"nrtitle"
#define P_TAGS @"tags"



//攻略
#define P_LIST @"list"
#define P_ALBUM @"Album"
#define P_ALBUM2 @"album2"
#define P_NAME @"name"
#define P_NAME2 @"name2"//
#define P_PHONE @"phone"
#define P_PATH @"path"
#define P_PATH2 @"path2"//
#define P_PHOTO @"photo"
#define P_SOURCE @"source"
#define P_SQUARE_PHOTO @"square_photo"
#define P_DAY @"day"
#define P_INTRO @"intro"
#define P_SITE_NAME @"site_name"
#define P_SUGGEST_TIME @"suggest_time"
#define P_ID @"id"
#define P_TYPE @"type"

#define P_TYPE_URL @"URL"
#define P_TYPE_DAYS @"DAYS"

//v 2.0
#define P_V2_TOOLDETAIL @"tool"
#define P_V2_TOOLDETAIL_TOOLLIST @"items"
#define P_V2_TOOLDETAIL_TOOLLIST_IMAGE @"cover_path"
#define P_V2_TOOLDETAIL_TOOLLIST_NAME @"name"
#define P_V2_TOOLDETAIL_TOOLLIST_INTRO @"intro"
#define P_V2_TOOLDETAIL_TOOLLIST_TYPE @"type"
#define P_V2_TOOLDETAIL_TOOLLIST_URL @"url"
#define P_V2_TOOLDETAIL_TOOLLIST_REL_ID @"rel_id"
#define P_V2_TOOLDETAIL_TOOLLIST_URL @"url"

#define P_V2_TOOLDETAIL_TOOLLIST_TYPE_L_NEWS @"L_NEWS"
#define P_V2_TOOLDETAIL_TOOLLIST_TYPE_URL @"URL"
#define P_V2_TOOLDETAIL_TOOLLIST_TYPE_L_STORE @"L_STORE"
#define P_V2_TOOLDETAIL_TOOLLIST_TYPE_L_GOODS @"L_GOODS"
#define P_V2_TOOLDETAIL_TOOLLIST_TYPE_APP @"APP"

//支付
#define P_MOBILE @"mobile"
#define P_CODE @"code"
#define P_PRODUCTID @"productId"
#define P_NUM @"num"
#define P_ORDERPRICE @"orderPrice"
#define P_NOTE @"note"
#define P_ORDERSN @"orderSN"
#define P_PAYWAY @"payWay"
#define P_TN @"tn"
#define P_STATUS @"status"
#define P_STATUSNAME @"statusName"
#define P_PAYSTATUS @"paystatus"
#define P_SN @"sn"
#define P_SEARCHCOUPON @"searchCoupon"
#define P_COUPONCODE @"couponCode"
#define P_ORDERAMOUNT @"orderAmount"
#define P_PAYAMOUNT @"payAmount"
#define P_REFUNDDESC @"refundDesc"
#define P_OKSN @"oksn"
#define P_REFUNDSTATUS @"refundStatus"
#define P_ORDERSTATUS @"orderStatus"
#define P_ORDERSTATUSNAME @"orderStatusName"
#define P_CONFIRMSTATUS @"confirmStatus"

#pragma mark - V2.0

//模块
#pragma mark - by ryan
#define V2APIHOMEPAGE @"V2ApiHomePage"
#define V2APINEWS @"V2ApiNews"
#define V2APISTORES @"V2ApiStores"
#define V2APICUSTOM @"V2ApiCustom"
#define V2APIRETRIEVE @"V2ApiRetrieve"

#pragma mark - by jason
#define P_V2APISTORES @"V2ApiStores"
#define P_V2APIGOODS @"V2ApiGoods"
#define P_V2APICOUPON @"ApiCoupon"
#define P_V2APIGOOD @"V2ApiGood"
#define P_V2APICOLLECTIONS @"V2ApiCollections"
#define P_V2APICOMMENTS @"V2ApiComments"
#define P_V2APIUSER @"V2APIUser"

//首页
#define P_SEASONLIST @"seasonList"
#define P_OKLIST @"okList"
#define P_COVER_PATH @"cover_path"
#define P_UPDATED_TIME @"updated_time"

//用户
#pragma mark - 接口
#pragma mark - by jason
#define P_V2_USERINFO @"userInfo"
#define P_V2_COUPONLIST @"couponList"
#define P_V2_GET_SN @"snList"
#define P_V2_GET_MOBILE_CODE @"getMobileCode"
#define P_V2_GET_MOBILE_VERIFY_CODE @"getRestPwdMobileCode"
#define P_V2_SET_PASSWORD_WITH_OLD @"changePassword"
#define P_V2_SET_PASSWORD_WITH_NEW @"resetPassword"
#define P_V2_GET_EMAIL_VERIFY @"forgetPassword"

#pragma mark - 参数
#pragma mark - by jason
#define P_V2_STATUS @"status"
#define P_V2_PAGE @"page"
#define P_V2_PASSWORD_NEW @"newPassword"
#define P_V2_MAIL @"email"

//商家相关
#pragma mark - 接口
#pragma mark - by jason
#define P_V2_GET_CONTENT @"getContent"
#define P_V2_GET_GOODS @"getGoods"
#define P_V2_GET_EXTRATYPE @"getExtraType"
#define P_V2_GET_AREA @"getAreas"

#pragma mark - 参数
#pragma mark - by jason
#define P_V2_STORE_ID @"id"
#define P_V2_STOREID @"storeId"

//商品
#define P_V2_OKCASH @"okcash"
#define P_V2_STORECASH @"storecash"

//列表
#pragma mark - by ryan
#define P_V2_RGB @"rgb"
#define P_V2_STORES @"stores"
#define P_V2_DISTRICT_NAME @"district_name"
#define P_V2_TYPE_NAME @"type_name"
#define P_V2_GOOD @"good"
#define P_V2_COMMENT_CNT @"comment_cnt"
#define P_V2_SOURCE_NAME @"source_name"
#define P_V2_REF_ID @"ref_id"
//#define P_V2_GETHOMENEWS @"getHomeNews"//旧版无首页专题栏目的接口
#define P_V3_GETHOMENEWS @"getHomeNewsV3"
#define P_V2_NEWS @"news"
#define P_V2_TAG @"tag"
#define P_V2_AREANAME @"areaName"
#define P_V2_GPS @"gps"
#define P_V2_RADIUS @"radius"
#define P_V2_TYPES @"types"
#define P_V2_STORES @"stores"
#define P_V2_STRATEGY @"strategy"
#define P_V2_DISTANCE @"distance"
#define P_V2_HAS_MICRO_SITE @"has_micro_site"

#pragma mark - 参数
#pragma mark - by jason
#define P_V2_CATEGORYID @"categoryId"

//工具
#pragma mark -  接口

#pragma mark - 参数
#pragma mark - by jason
#define P_V2_CITY @"city"
#define P_V2_TOOLID @"toolId"

//设置相关
#pragma mark - by ryan
#define P_PLATFORM @"platform"
#define P_MSG @"msg"

//收藏
#pragma mark -  接口
#pragma mark - by jason
#define P_V2_ADD_COLLECTION @"add"
#define P_V2_DELETE_COLLECTION @"delete"
#define P_V2_GET_COLLECTION @"getList"

#pragma mark - 参数
#pragma mark - by jason
#define P_V2_RELATED_ID @"relatedId"

//评论
#pragma mark - 接口
#pragma mark - by jason
#define P_V2_GET_COMMENT @"getComments"
#define P_V2_ADD_COMMENT @"addComment"

#pragma  mark - 参数
#pragma mark - by jason
#define P_V2_COMMENT_TYPE @"type"
#define P_V2_COMMENT_ID @"id"
#define P_V2_COMMENT_USER_ID @"userId"
#define P_V2_COMMENT_REL_ID @"relId"
#define P_V2_COMMENT_CONTENT @"content"

//全局搜索
#pragma mark - Ryan
#pragma mark - 接口

#pragma mark - 参数
#define P_V2_KEYWORD @"keyword"


//其他
#pragma mark - 接口
#pragma mark - by jason
#define P_V2_ADD_LIKE @"add"

#pragma mark - 参数
#pragma mark - by jason
#define P_V2_TYPE @"type"
#define P_V2_ID @"id"

//支付
#pragma mark - 接口
#define R_V2_SEARCHCOUPONLIST @"searchCouponList"

#pragma mark - 参数
#define P_CASH @"cash"
#define P_CASH2 @"cash2"
#define P_ISUSEBALANCE @"isUseBalance"
#define P_COUPON @"coupon"


//version；2.1 - Bable
//资讯列表中的专题-Bable
#define P_TOPIC_ID @"topic_id"
#define P_TOPIC_TITLE @"topic_title"
#define P_IS_TOPIC @"is_topic"
#define P_TOPIC_NEWS @"topic_news"
#define P_TOPIC_NEWS_ID @"id"
#define P_TOPIC_NEWS_NPHOTO @"nphoto"
#define P_TOPIC_NEWS_URL @"url"

#define P_TOPIC_DETAILS_TOPIMAGE_URL @"detail_topic_photo"//点击专题进入的详细内容页面的顶部图片（目前API中没有）
#define P_TOPIC_DETAILS_LIST_CELL_TITLE @"detail_list_title"//详细列表CELL的title
#define P_TOPIC_DETAILS_LIST_CELL_ID @"detail_list_title"//详细列表CELL的title

//注意：此处定义的为获取完整的首页资讯列表api的url地址，专题项目们包含在其中；url的定义方式与前版本完全不同（前版本定义了多个有意义的字段，通过[ProtocolManager getRequestUrlPath: operation: params:@{P_REQ:加密过的请求字段}]来拼成相应url地址）
//由于目前版本的专题栏目暂时没有复杂的类型、请求字段等，所以在这里直接定义url地址
//#define P_TOPIC_API_URL @"http://api.okhaolvxing.com/okhaolvxing/index.php/V2ApiTopics/getTopicNews/?req=eyJ0b3BpY0lkIjoxM30="
#define P_TOPIC_API_URLPATH @"http://api.okhaolvxing.com/okhaolvxing/index.php/V2ApiNews/getHomeNewsV3?sid=null&req=eyJiZWdpbk5vIjoiMCIsInJldHVybkNvdW50IjoiMTAiLCJ0b3BpY0lkIjowLCJ0eXBlSWQiOjB9"

/* 专题JSON示例
"topic_id": "13",
"topic_title": "新闻",
"is_topic": true,//判断是否为专题类型
"topic_news": [
               {
                   "id": "1613",
                   "nphoto": "Uploads//image/NEWS_RELEASE/55112dbbe640c.jpg",
                   "url": "http://api.okhaolvxing.com/okhaolvxing/index.php/V2ApiNews/getContentPage/id/1613"
               },
               {
                   "id": "1599",
                   "nphoto": "Uploads//image/NEWS_RELEASE/550d1cecc90b9.jpg",
                   "url": "http://api.okhaolvxing.com/okhaolvxing/index.php/V2ApiNews/getContentPage/id/1599"
               },
               {
                   "id": "1569",
                   "nphoto": "Uploads//image/NEWS_RELEASE/550bc5217afad.jpg",
                   "url": "http://api.okhaolvxing.com/okhaolvxing/index.php/V2ApiNews/getContentPage/id/1569"
               },
               {
                   "id": "1056",
                   "nphoto": "http://mmbiz.qpic.cn/mmbiz/6vSjASweEtBfZic6O8gsCvbvIeVotNc3E1M0u0V3y2uwXA5rz9IeFQB747KRtWNhbXiahHFofZ5cV05HtrTYdRDg/0",
                   "url": "http://api.okhaolvxing.com/okhaolvxing/index.php/V2ApiNews/getContentPage/id/1056"
*/

#define OKSERVICEPHONE @"07566919360"

//专题页面及全部专题页面API URL字段
#define P_V2_TOPICID @"topicId"//请求字段
#define V2APITOPSPAECAILDETAIL @"V2ApiTopics"//专题页面部分
#define R_GETTOPICNEWS @"getTopicNews"//请求类型

//专题页面api字段
#define P_TPOIC_DETAILS_NEWS @"news"
#define P_TOPIC_DETAILS_TOPIMAGEURL @"cover_url"

#define P_TOPIC_DETAILS_URL @"url"
#define P_TOPIC_DETAILS_SUBTITLE @"subtitle"

//全部专题页面api字段
#define R_GETTOPICS @"getTopics"
#define P_ALLTOPICS_MAGEURL @"cover_url"
#define P_ALLTOPICS_GETTOPICID @"id"

#endif
